package com.nhim.cms.admin.server;

import java.util.List;

import org.springframework.stereotype.Service;

import com.nhim.cms.domain.CustomWidget;
import com.nhim.cms.util.CustomWidgetManager;
import com.nhim.core.AppContext;

@Service("CustomWidgetService")
public class CustomWidgetService {
	
	
	public static Integer countCustomWidgetBySearch(String startsWith)
	{
		return CustomWidgetManager.getFromApplicationContext(AppContext.getApplicationContext()).countCustomWidgetBySearch(startsWith);
	}

	public static List<CustomWidget> findCustomWidgetEntriesBySearch(String startsWith, String orderBy) {
		return CustomWidgetManager.getFromApplicationContext(AppContext.getApplicationContext()).findCustomWidgetEntriesBySearch(startsWith,orderBy);
	}
}
